import request from '@/utils/request'

// 查询薪资列表
export function listSalary(query) {
  return request({
    url: '/module/salary/list',
    method: 'get',
    params: query
  })
}

// 查询薪资详细
export function getSalary(id) {
  return request({
    url: '/module/salary/' + id,
    method: 'get'
  })
}

// 新增薪资
export function addSalary(data) {
  return request({
    url: '/module/salary',
    method: 'post',
    data: data
  })
}

// 修改薪资
export function updateSalary(data) {
  return request({
    url: '/module/salary',
    method: 'put',
    data: data
  })
}

// 删除薪资
export function delSalary(id) {
  return request({
    url: '/module/salary/' + id,
    method: 'delete'
  })
}
//计算薪资
export function countSalary(data) {
  return request({
    url: '/module/salary/put/edit2' ,
    method: 'put',
    data
  })
}
//自定义导出
export function exportSalaryApi (query){
  return request({
    url:'/module/salary/get/export2',
    method:'get',
    params: query,
    responseType: 'blob',
  })
}
